@page "/Vehicle/{License}"
@using Rental.Data
@using Rental.Data.Context
@inject RentalContext RentalContext

<Navigation/>

<main class="row px-4 bg-light py-md-5">

    <CardVehicleInfo Bags="@_car.Bags" Doors="@_car.Doors" People="@_car.People" Price="@_car.Price" 
                     Name="@_car.Name" Image="@_car.Image" License="@_car.License" Copyright="@_car.Copyright" 
                     Transmission="@_car.Transmission" AirConditioning="@_car.AirConditioning"  />

</main>

<Footer></Footer>

@code {
    
    [Parameter]
    public string License { get; set; }

    private Car _car;

    protected override async Task OnInitializedAsync()
    {
        _car = await RentalContext.GetCarByLicense(License);
    }
    
}
